<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>F-过渡和动画</title>
    <style>
        .demo{
            width: 100px;
            height: 100px;
            background: #000;
            /*transition: height 1s;*/
            transition: height 1s,width 1s;
        }
        .demo:hover{
            width: 150px;
            height: 150px;
        }

        @keyframes go{
            from{
                width:200px;
            }
            to{
                width:500px
            }
        }
        .demo2{
            width:100px;
            height:100px;
            background: #000;
            animation:go 1s ease-in 1s  both;
        }

    </style>
</head>
<body>

<div class="demo"></div>

<div class="demo2">

</div>
</body>
</html>